
import 'package:flutter/material.dart';
import 'package:flutter_app/mod/version_info.dart';
import 'package:get/get_rx/src/rx_types/rx_types.dart';

class CounterButton extends StatelessWidget {
 final String text;
 final Color textColor,color,heightColor;
 final double? width;
 final ValueChanged<String>? onValueChange;
  const CounterButton(
  {Key? key,
     required this.text,
     this.textColor = Colors.white,
     this.color = const Color(0xFF363636),
     this.heightColor = Colors.white,
     this.onValueChange,
     this.width
     }) : super(key: key);



  @override
  Widget build(BuildContext context) {
    return  Ink(
      decoration: BoxDecoration(
          color: color,
          borderRadius: BorderRadius.all(Radius.circular(200))),
      child: InkWell(
        onTap: (){
          onValueChange?.call(text);
        },
        borderRadius: BorderRadius.all(Radius.circular(200)),
        highlightColor: heightColor,
        child: Container(
          width: width??70,
          height: 70,
          padding: EdgeInsets.only(left: width == null?0:25),
          alignment: width == null?Alignment.center:Alignment.centerLeft,
          child: Text(text,style: TextStyle(color: textColor,fontSize: 24),),
        ),
      ),
    );
  }
}
